package org.gui.featureSelection;

import java.awt.GridLayout;
import java.util.ArrayList;

import javax.swing.JCheckBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;


public class MostFrequentWordsPanel extends JPanel{

		private static final long serialVersionUID = 1L;
		
		JCheckBox isSelected;		
		JLabel mostFreqWordsLabel;
		JTextField mostFreqWordsInput;

		
	public MostFrequentWordsPanel(){

		setLayout(new GridLayout(1,2,0,10));
		isSelected = new JCheckBox("Frequent words");
		mostFreqWordsLabel = new JLabel("Words= ");
		mostFreqWordsLabel.setHorizontalAlignment(JLabel.RIGHT);
		mostFreqWordsInput = new JTextField();
		add(isSelected);
		add(mostFreqWordsLabel);
		add(mostFreqWordsInput);
	}
	
	public ArrayList<String> getFeature(){
		ArrayList<String> answer = new ArrayList<String>();
		if(isSelected.isSelected()==true){
			answer.add(mostFreqWordsInput.getText());
			return answer;
		}
		
		return null;
	}

}
